{% extends 'qa_index.html' %}
{% block lesson %}

    <script>
        var user_info = {
            'access_token': '{{ access_token }}',
            'sessionUser': {
                'name': '{{ name }}',
                'userId': '{{ userId }}',
                'passwordState': '{{ passwordState }}',
                'role': {
                    'roleCode': '{{ roleCode }}',
                    'roleId': '{{ roleId }}'
                }
            }
        };
        window.onmessage = function (e) {
            console.log(user_info, '—————')
            e.source.postMessage({'user_info': user_info}, '*')
        }
    </script>
{% endblock %}

{% block all_content %}
    {% if error %}
        {{ error }}
    {% else %}
        {% if env %}
            {% ifequal env 'dev' %}
                <iframe src="http://test-lms3.hfjy.com:1080/resource/index.html#!/lessonplan/teacher" width="1500"
                        height="800">
                </iframe>
            {% endifequal %}

            {% ifequal env 'outline' %}
                <iframe src="http://i2.hfjy.com/resource/index.html#!/lessonplan/teacher" width="1500" height="800">
                </iframe>
            {% endifequal %}

            {% ifequal env 'test' %}
                <iframe src="http://test-s3.hfjy.com/resource/index.html#!/lessonplan/teacher" width="1500"
                        height="800">
                </iframe>
            {% endifequal %}
        {% endif %}
    {% endif %}

{% endblock %}